package ar.com.pragmatia.lanacion.data;

import ar.com.pragmatia.lanacion.app.App;

public class DataFactory {

	public static AppData getClass(String criteria) {

		if (criteria.equals("clients")) {
			return (Client) new Client();
		} else if (criteria.equals("visits")) {
			return (Visit) new Visit();
		} else if (criteria.equals("visit_claims")) {
			return (VisitClaim) new VisitClaim();
		} else if (criteria.equals("visit_delivered_items")) {
			return (VisitDeliveredItem) new VisitDeliveredItem();
		} else if (criteria.equals("visit_reasons")) {
			return (VisitReason) new VisitReason();
		} else if (criteria.equals("visit_results")) {
			return (VisitResult) new VisitResult();
		} else if (criteria.equals("road_map_filters")) {
			return (RoadMapFilter) new RoadMapFilter();
		} else if (criteria.equals("traveling_loads")) {
			return (TravelingLoad) new TravelingLoad();
		} else if (criteria.equals("users")) {
			return (User) new User();
		} else if (criteria.equals("pending_clients")) {
			return (PendingClient) new PendingClient();
		} else if (criteria.equals("articles")) {
			return (Article) new Article();
		} else if (criteria.equals("orders")) {
			return (Order) new Order();
		} else if (criteria.equals("order_details")) {
			return (OrderDetail) new OrderDetail();
		} else {
			App.log("DataFactory", "getClass", "Invalid entity name: "
					+ criteria);
			return null;
		}

	}

}
